﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
	<meta content="" name="description" />
    <meta content="webthemez" name="author" />
    <title>上传课题</title>
	<!-- Bootstrap Styles-->
    <link href="assets/css/bootstrap.css" rel="stylesheet" />
    <link href="assets/css/bootstrap.min.css" rel="stylesheet" media="screen"/>
     <!-- FontAwesome Styles-->
    <link href="assets/css/font-awesome.css" rel="stylesheet" />
	
    <link href="assets/css/select2.min.css" rel="stylesheet" >
	<link href="assets/css/checkbox3.min.css" rel="stylesheet" >
        <!-- Custom Styles-->
    <link href="assets/css/custom-styles.css" rel="stylesheet" />
     <!-- Google Fonts-->
   <link href='https://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css' />
    <link href="assets/css/bootstrap-datetimepicker.min.css" rel="stylesheet" media="screen">
</head>
<body>
        <div id="page-wrapper" >
		  <div class="header"> 
                        <h1 class="page-header">
                            我要出题  <small>完善题目信息</small>
                        </h1>
		</div>
		
            <div id="page-inner">


                    <div class="row">
                        <div class="col-xs-12">
                            <div class="panel panel-default">
                                <div class="panel-body">
                                    <form class="form-horizontal" id="form">
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label"><span style="color:red">*</span>课题名称</label>
                                            <div class="col-sm-10">
                                                <input type="topicName" class="form-control" id="topicName" placeholder="课题名称" width="30px">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label"><span style="color:red">*</span>课题来源</label>
                                            <div class="col-sm-10">
                                                <select class="selectbox" style="width: 200px" id="topicSrc">
                                                <optgroup label="课题来源">
                                                <option value="A">结合教师科研</option>
                                                <option value="B">结合生产实际</option>
                                                <option value="C">结合实验</option>
                                                <option value="D">结合实际背景的专题研究</option>
                                                <option value="E">无实际背景的专题研究</option>
                                                </optgroup>
                                                </select>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label"><span style="color:red">*</span>课题类别</label>
                                            <div class="col-sm-10">
                                                <select class="selectbox" style="width: 200px" id="topicType">
                                                <optgroup label="课题类别">
                                                <option value="A">学术论文</option>
                                                <option value="B">调查报告</option>
                                                <option value="C">工程设计</option>
                                                <option value="D">实验</option>
                                                <option value="E">理论计算</option>
                                                </optgroup>
                                                </select>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label"><span style="color:red"> *</span>课题要求</label>
                                            <div class="col-sm-10">
                                                <input type="requirement" class="form-control" id="requirement" placeholder="学生要求" width="30px">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label"><span style="color:red">*</span>课题简介</label>&nbsp;
                                            <textarea class="form-control" rows="5"  style="width:662px" id="introduction"></textarea>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label"><span style="color:red"> *</span>人数限制</label>
                                            <div class="col-sm-10">
                                                <input type="limitPerson" class="form-control" id="limitPerson" placeholder="人数限制(填入数字)" width="30px">
                                            </div>
                                        </div>
                                        <!--<div class="form-group">-->
                                            <!--<label class="col-sm-2 control-label"><span style="color:red"> *</span>截止时间</label>-->
                                            <!--<div class="col-sm-10">-->
                                                <!--<div class="input-group date form_datetime col-md-5" data-date="2017-11-01T05:25:07Z" data-date-format="yyyy-mm-dd hh:ii:ss" data-link-field="dtp_input1">-->
                                                    <!--<input class="form-control" size="16" type="text" value="" readonly id="finalDate">-->
                                                    <!--<span class="input-group-addon"><span class="glyphicon glyphicon-remove"></span></span>-->
                                                    <!--<span class="input-group-addon"><span class="glyphicon glyphicon-th"></span></span>-->
                                                <!--</div>-->
                                                <!--<input type="hidden" id="dtp_input1" value="" /><br/>-->
                                            <!--</div>-->
                                        <!--</div>-->
                                        <div class="form-group">
                                            <div class="col-sm-offset-2 col-sm-10">
                                                <input type="button" class="btn btn-default" onclick="update()" value="提交">
                                            </div>
                                        </div>
                                    </form>
                                </div>
                            </div>
                        </div>
                    </div>
               

			</div>
             <!-- /. PAGE INNER  -->
            </div>
         <!-- /. PAGE WRAPPER  -->
        </div>
     <!-- /. WRAPPER  -->
    <!-- JS Scripts-->
    <!-- jQuery Js -->
    <script src="assets/js/jquery-1.10.2.js"></script>
      <!-- Bootstrap Js -->
    <script src="assets/js/bootstrap.min.js"></script>
    <!-- Metis Menu Js -->
    <script src="assets/js/jquery.metisMenu.js"></script>
	<script src="assets/js/select2.full.min.js"></script>
        <script type="text/javascript" src="assets/js/bootstrap-datetimepicker.js" charset="UTF-8"></script>
        <script type="text/javascript" src="assets/js/bootstrap-datetimepicker.fr.js" charset="UTF-8"></script>
	<script type="text/javascript">
	$(document).ready(function() {
	  $(".selectbox").select2();
	});
    $('.form_datetime').datetimepicker({
        //language:  'fr',
        weekStart: 1,
        todayBtn:  1,
        autoclose: 1,
        todayHighlight: 1,
        startView: 2,
        forceParse: 0,
        showMeridian: 1
    });
    $('.form_date').datetimepicker({
        language:  'fr',
        weekStart: 1,
        todayBtn:  1,
        autoclose: 1,
        todayHighlight: 1,
        startView: 2,
        minView: 2,
        forceParse: 0
    });
    $('.form_time').datetimepicker({
        language:  'fr',
        weekStart: 1,
        todayBtn:  1,
        autoclose: 1,
        todayHighlight: 1,
        startView: 1,
        minView: 0,
        maxView: 1,
        forceParse: 0
    });
	</script>
      <!-- Custom Js -->
    <!--<script src="assets/js/custom-scripts.js"></script>-->
        <script src="assets/js/util.js"></script>
	<script>
        var user= JSON.parse(sessionStorage.getItem("user"));//将json转换为对象

        // document.getElementById("realname").innerHTML=user.realname;
        // document.getElementById("username").innerHTML=user.username;
        function update() {
            var id=user.id;
            var topicName=document.getElementById("topicName").value;
            var topicSrc=document.getElementById("topicSrc").value;
            var topicType=document.getElementById("topicType").value;
            var requirement=document.getElementById("requirement").value;
            var introduction=document.getElementById("introduction").value;
            var limitPerson=document.getElementById("limitPerson").value;
            var formData=new FormData();
            formData.append("id",id);
            formData.append("topicName",topicName);
            formData.append("topicSrc",topicSrc);
            formData.append("topicType",topicType);
            formData.append("requirement",requirement);
            formData.append("introduction",introduction);
            formData.append("limitPerson",limitPerson);

            var re=getResponse("/topic/save/"+id,formData,"multipart/form-data")
            alert("提交完成");

        }

    </script>
		
   
</body>
</html>
